package com.neouton.crm.pm.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.neouton.common.entity.BaseEntityVO;
import com.neouton.crm.approval.entity.ApprovalVO;
import com.neouton.crm.entity.SysUserEntity;
import com.neouton.crm.payRecords.entity.PaymentRecords;
import com.neouton.crm.payRecords.entity.PaymentRequest;
import com.neouton.crm.paymentPlan.entity.PaymentPlan;
import com.neouton.crm.receiptRecords.entity.ReceiptRecords;
import com.neouton.crm.refundRecords.entity.RefundRecordsVO;
import com.neouton.crm.sales.entity.SalesFileRelationVO;
import com.neouton.crm.supplier.entity.SupplierVO;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 采购相关Vo
 * @Author libingkun
 * @Date 2022年11月30日
 * @Version 1.0
 *          初始化迁移
 */
@Data
public class PurchaseOrderVO extends BaseEntityVO implements Serializable {
    /**
     * 主键ID
     */
    private Integer purchaseId;
    /**
     * 项目ID
     */
    private Integer projectManageId;


    /**
     * 机会点ID
     */
    private Integer opportunityId;

    /**
     * 机会点主题
     */
    private String opportunityTheme;

    /**
     * 项目名称
     */
    private String projectManageTheme;

    private Integer approvalId;

    private ApprovalVO approval;

    /**
     * 供应商信息
     */
    private SupplierVO supplier;

    /**
     * 供应商信息
     */
    private Integer supplierId;
    /**
     * 采购名称
     */
    private String purchaseTopic;
    /**
     * 采购单号
     */
    private String purchaseNo;
    /**
     * 采购分类
     */
    private Integer purchaseType;

    /**
     * 采购类别
     */
    private Integer purchaseCategories;

    /**
     * 采购类别
     */
    private String purchaseCategoriesStr;

    private String purchaseTypeStr;
    /**
     * 供应商联系人
     */
    private String supplierUser;
    /**
     * 我方负责人
     */
    private SysUserEntity purchaseUser;

    /**
     * 计划期次
     */
    private Integer paymentPlanPeriod;

    private String paymentPlanPeriodStr;
    /**
     * 采购日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date purchaseDate;

    /**
     * 退款日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date refundDate;

    private String purchaseDateStr;

    /**
     * 采购单产品列表
     */
    List<PurchaseOrderProductVO> purchaseOrderProducts;
    /**
     * 付款计划
     */
    private List <PaymentPlan> paymentPlans;

    private List<ReceiptRecords> receiptRecords;

    private List<PaymentRecords> paymentRecords;

    private List<PaymentRequest> paymentRequests;
    private List<SalesFileRelationVO> salesFileRelations;

    private List<RefundRecordsVO> refundRecords;
    /**
     * 合同单号ID
     */
    private Integer contractId;

    /**
     * 排序字段
     */
    private String orderByProp;

    /**
     * 排序类型
     */
    private String order;


    /**
     * 合同名称
     */
    private String contractTopic;

    /**
     * 采购总价
     */
    private String totlePrice;

    /**
     * 采购总价
     */
    private List<String> totlePrices;


    private String totlePricePage;

    /**
     * 未退金额
     */
    private BigDecimal unrefundedMoney;

    /**
     * 我方代表ID
     */
    private Integer ownerUserId;

    /**
     * 日期集合
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private List<Date> purchaseDateList;

    /**
     * 审批状态
     */
    private String approvalStatus;

    private String approvalStr;

    /**
     * 申请原因
     */
    private String askReason;

    /**
     * 审批意见
     */
    private String appReason;

    /**
     * 采购总金额
     */
    private BigDecimal amount;



    /**
     * 付款总金额
     */
    private BigDecimal paymentMoneys;

    private String paymentMoneyPage;

    /**
     * 收票金额
     */
    private BigDecimal tickerMoneys;

    /**
     * 退款金额
     */
    private BigDecimal refundMoney;
    /**
     * 退款金额
     */
    private String refundMoneyPage;

    private String tickerMoneyPage;

    // 未退款总金额
    private String unrefundedMoneyPage;

    private Integer headerId;

    /**
     * 查询的类型名称，用于区分（采购）
     */
    private String purTypeName;
    /**
     * 查询的类型名称，用于区分（未付款）
     */
    private String notPayTypeName;

    /**
     * 转发人集合
     */
    private List<SysUserEntity> forwardUsers;

    /**
     * 逾期天数
     */
    private String overdueDays;

    /**
     * 当前状态
     */
    private String currentStatus;

    private String userName;

    /**
     * 实际退款日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date actualRefundDate;
}
